<?php
session_start();
error_reporting(0);
if(isset($_SESSION['user_name'])){
	include("cls_template.php");
	$db = new mysqls("email");
	$sql = "select * from updateemailinfo";
	$result = $db->dbfetchAll($sql);
?>
<style type="text/css">
<!--
.STYLE1 {color: #FFFFFF}
-->
</style>

<table width="1085" height="166" border="0" bgcolor="#666666">
  <tr bgcolor="#CC3300">
    <td width="76">Email</td>
    <td width="63">Frequency</td>
    <td width="63">Subscribe</td>
    <td width="212">what are you intersting about?</td>
    <td width="539">Do you have any suggestion or idea? </td>
    <td width="106">time</td>
  </tr>
<?php
    foreach($result as $key=>$value){
?>  
  <tr bgcolor="#FFFFFF">
    <td><?php echo $value['email'];?></td>
    <td><?php if($value['frequency']!='6'){echo $value['frequency']."times";}else{echo "cancel";}?></td>
    <td><?php if($value['subscribe']=='1'){echo "cancel";}else{echo "update";}?></td>
    <td><?php echo $value['interest'];?></td>
    <td><?php echo $value['suggestion'];?></td>
    <td><?php echo date("Y-m-d H:i:s",$value['timestamp']);?></td>
  </tr>
  <?php if($key % 10 == 0){?>
  <tr>
    <td colspan="6"><span class="STYLE1" style="font-size:12px">0--Boys 0-24 Mos,1--Men's Shoes,2--Men's Apparel,3--Men's Accessories,4--Women's Apparel,5--Women's Shoes,6--Women's Accessories,7--Girls 0-24 Mos,8--Girls 2T-5T,9--Girls (4+),10--Boys 2T-5T,11--Boys (4+),12--Parts & accessories,13--Computers & Tablets,14--Cameras & Photography,15--Cell Phones & Accessories,16--TV, Audio & Surveillance,17--Video Games & Consoles,18--Car Audio, Video & GPS,20--Collectibles & Art,21--Home & garden</span></td>
  </tr>
  <?php }?>  
<?php
    }
?>  
  <tr>
    <td colspan="6"><span class="STYLE1" style="font-size:12px">0--Boys 0-24 Mos,1--Men's Shoes,2--Men's Apparel,3--Men's Accessories,4--Women's Apparel,5--Women's Shoes,6--Women's Accessories,7--Girls 0-24 Mos,8--Girls 2T-5T,9--Girls (4+),10--Boys 2T-5T,11--Boys (4+),12--Parts & accessories,13--Computers & Tablets,14--Cameras & Photography,15--Cell Phones & Accessories,16--TV, Audio & Surveillance,17--Video Games & Consoles,18--Car Audio, Video & GPS,20--Collectibles & Art,21--Home & garden</span></td>
  </tr>
</table>
<?php }else{
    exit("exit");
}
?>
